import Vue from 'vue'
import VueRouter from 'vue-router'
// import shouye from '../views/shouye.vue'

Vue.use(VueRouter)

const routes = [{ //一级路由多个
        path: '/shouye',
        name: 'shouye',
        component: () =>
            import ('../views/shouye.vue'),

    },
    {
        path: '/baobaotuan',
        name: 'baobaotuan',
        component: () =>
            import ('../views/baobaotuan.vue')
    },
    {
        path: '/dindang',
        name: 'dindang',
        component: () =>
            import ('../views/dindang.vue')
    },
    {
        path: '/wode',
        name: 'wode',
        component: () =>
            import ('../views/wode.vue')
    },
    {
        path: '*',
        component: () =>
            import ('../views/404.vue')
    },
    // 默认首次加载就加载的页面组件
    {
        path: '',
        pedirect: '/shouye'
    }
]

const router = new VueRouter({
    mode: 'history',
    base: process.env.BASE_URL,
    routes
})

export default router